package com.whfc.common.enums;

/**
 * 打卡类型
 *
 * @author : qzexing
 * @version : 1.0
 * @date : 2020-08-21 15:22
 */
public enum PunchType {


    FACE_ATTEND(1, "人脸考勤"),

    FINGERPRINT_ATTEND(2, "指纹打卡"),

    IRIS_ATTEND(3, "虹膜考勤"),

    IC_CARD_ATTEND(4, "IC卡识别"),

    VIDEO_ATTEND(5, "视频识别"),

    ID_CARD_ATTEND(6, "ID卡识别");

    private Integer value;

    private String desc;

    PunchType(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static PunchType parseValue(Integer value) {
        switch (value) {
            case 1:
                return FACE_ATTEND;
            case 2:
                return FINGERPRINT_ATTEND;
            case 3:
                return IRIS_ATTEND;
            case 4:
                return IC_CARD_ATTEND;
            case 5:
                return VIDEO_ATTEND;
            case 6:
                return ID_CARD_ATTEND;
            default:
                return null;
        }
    }

}
